package com.dhcc.rarp.ws.service.hello.impl;

import java.util.Random;

import javax.jws.WebParam;
import javax.jws.WebService;

import com.dhcc.rarp.ws.service.hello.HelloWs;

/**
 * <p>标题: Hello.java</p>
 * <p>业务描述:框架示例</p>
 * <p>公司:东华医为</p>
 * <p>版权:dhcc2018</p>
 * @author 
 * @date 2014年5月10日
 * @version V1.0 
 */
@WebService(targetNamespace="http://hello.service.ws.rarp.dhcc.com/",endpointInterface = "com.dhcc.rarp.ws.service.hello.HelloWs")
public class HelloWsImpl implements HelloWs{

	@Override
    public String sayHello(@WebParam(name="msgRq")String name) {
    	System.out.println("sayHello: "+name+" coming! return 'Hello "+name+"'");
        return "Hello " + name;
    }
    
	@Override
    public void noResponse(@WebParam(name="msgRq")String name) {
    	System.out.println("noResponse: "+name+" coming! no return");
    }
    
	@Override
    public String noRequest() {
    	Random random = new Random();
    	String result=String.valueOf(Math.abs(random.nextInt())%100);
    	System.out.println("noRequest: return '"+result+"'");
    	return result;
    }

}

